//
//  LBDownLoadManager.h
//  FBSnapshotTestCase
//
//  Created by liubo on 2021/12/18.
//

#import <Foundation/Foundation.h>
#import "LBDownLoader.h"

NS_ASSUME_NONNULL_BEGIN

@interface LBDownLoadManager : NSObject

///保存的文件名，如果没有传，则默认使用下载链接的最后一段路径
@property (nonatomic, copy) NSString *fileName;

- (void)downLoader:(NSURL*)url
      downLoadInfo:(DownLoadInfoBlock)downLoadInfo
          progress:(ProgressBlock)progressBlock
           success:(SuccessBlock)successBlock
            failed:(FailedBlock)failedBlock;

- (void)downLoader:(NSURL*)url
      downloadPath:(NSString *)downLoadPath
          tempPath:(NSString *)tempPath
      downLoadInfo:(DownLoadInfoBlock)downLoadInfo
          progress:(ProgressBlock)progressBlock
           success:(SuccessBlock)successBlock
            failed:(FailedBlock)failedBlock;

/// 暂停
- (void)pauseWithURL:(NSURL *)url;
/// 恢复
- (void)resumeWithURL:(NSURL *)url;
/// 取消
- (void)cancleWithURL:(NSURL *)url;
/// 暂停所有
- (void)pauseAll;
/// 恢复所有
- (void)resumeAll;

@end

NS_ASSUME_NONNULL_END
